package com.lgq.demo;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

/**
 * Created by liguoqing on 2016/5/3.
 */
public class App {

    public static void main(String[] args) {

        Server jettyServer = new Server(8080);
        WebAppContext wac = new WebAppContext();
        wac.setContextPath("/helloworld");   // 启动时url地址栏输入的工程名
        wac.setWar("jfinal-helloworld/src/main/webapp");
        jettyServer.setHandler(wac);
        try {
            jettyServer.start();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
